home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 March
/
1986-03.d64
/
key to joy
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
55 lines
10 print"[147]":fori=1to168:reada:x=x+a:nexti
20 ifx<>23067thenprint"[147]typing error in data lines":stop
30 restore:tt$=chr$(142)+chr$(8)+"[147] keyboard to joystick ":printtt$
40 fori=828to856:reada:pokei,a:next
50 data120,169,49,141,20,3,169,234,141,21,3,88,96
60 data165,1,72,41,254,133,1,32
70 data27,191,104,133,1,76,126,234
80 fori=758to767:reada:pokei,a:next
90 data198,1,32,27,191,230,1,76,126,234
100 print"(if plan a doesn't work, try plan b)[145][145]"
110 print"plan a or b a[157][157][157]";
120 inputp$:i=758:ifp$="a"theni=841
130 poke835,i/256:poke830,i-peek(835)*256
140 fori=0to73:pokei+48923,peek(i+59953):next
150 fori=48997to49125:reada:pokei,a:next
160 data169,255,133,203,141,245,191,169,129
170 data133,245,169,235,133,246,162,0,142,141
180 data2,142,2,220,160,1,169,16,32,186,191
190 data232,74,144,249,136,16,244,140
200 data2,220,173,245,191,201,16,240,35,165
210 data203,162,3,157,230,191,189,230,191
220 data201,255,208,6,202,16,246,76
230 data135,234,133,203,162,0,189,231
240 data191,157,230,191,232,224,3,144
250 data245,76,221,234,72,57
260 data0,220,208,15,189,246,191,201
270 data65,144,10,41,63,13,141,2
280 data141,141,2,104,96,197,203,144
290 data7,133,203,104,141,245,191,96,72,165,203
300 data201,255,104,176,241,144,233
310 fori=49126to49141:pokei,255:next:fora=0to4:reada$(a):next
320 dataup,down,left,right,fire
330 forf=1to7:readf$(f):next
340 datashift,logo,shift+logo,ctrl,shift+ctrl,logo+ctrl,shift+logo+ctrl
350 poke808,239:printtt$:fori=0to1:print"joystick port";i+1
360 fora=0to4:print"press key for ";a$(a);"? ";
370 k=peek(197):f=peek(653):ifqthenifk<64orfthenq=0:goto400
380 ifk=64andf=0thenq=1
390 goto370
400 ifk=64thenk=k+f:a$=f$(f):poke198,0
410 poke49142+i*5+4-a,k
420 getg$:ifg$>""thena$=g$:goto420
430 ifa$=" "thena$="space"
440 ifa$=chr$(13)thena$="return"
450 poke216,1:printa$:nexta:print:nexti:poke198,0
460 print"maximum break length? 3[157]";:i=3
470 geta$:ifa$=chr$(13)thenprint:print:goto500
480 ifa$<"0"ora$>"9"then470
490 i=val(a$):printa$"[157]";:goto470
500 poke808,237:poke49047,i:poke49076,i
510 print"are your choices satisfactory? (y/n)"
520 geta$:ifa$="n"then350
530 ifa$="y"thensys828:printchr$(9);:new
540 goto520